package com.tgy.myplus.基础学习.Thread;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

/**
 * @author 送你一块二向箔
 * @date 2021/11/09 16:05
 */
public class TheardTotal {
    public static void main(String[] args) {
        /*
        Thread lambda
         */
        new Thread(()->{
            System.out.println("Thread");
        }).start();

        /*
        Runnable lambda
         */
        Runnable runnable=()->{
            System.out.println("Runnable");
        };
        runnable.run();


        /*
        Callable lambda
         */
        //Callable<Integer> callable = ()->{System.out.println("Runnable");return 666;};
        new Thread(new FutureTask<>(()->{System.out.println("Callable");return 666;})).start();

    }
}

